<?php use_helper('PA_Links') ?>
<?php slot("title", "Edycja elementu #{$id}") ?>
<script type="text/javascript">
  $(window).unload(function(){
    opener.location.reload();
    this.close();
  });
  
</script>
<?php if(isset($form)): ?>
  <form action="<?php echo link_to_app("Store", "updateItem", array("id" => $id)) ?>" method="post" id="updateForm">
    <input type="hidden" name="category" value="<?php echo $category->getName() ?>" />
    <input type="hidden" name="sf_method" value="put" />
    <table>
      <?php echo $form ?>
      <tr>
        <td colspan="2">
          <img src="/images/icons/save.png" class="middle" width="18" height="18"/>
          <a onclick="App.Form.submit('updateForm')" class="middle">Zapisz</a>
          <img src="/images/icons/abort.png" class="middle" width="18" height="18"/>
          <a onclick="window.close()" class="middle">Anuluj</a>
        </td>
      </tr>
    </table>
  </form>
<?php endif; ?>